#include <cstdlib>
#include<iostream>
#include"ThreadPool.hpp"
#include"Task.hpp"

int Add(int x,int y){
    return x+y;
}
int main()
{
    srand((unsigned long)time(nullptr));
    ThreadPool<Task>::getThreadPool()->run();
    while(true)
    {
        int x=rand()%100+1;
        int y=rand()%30+1;
        
        Task task(x,y,Add);
        ThreadPool<Task>::getThreadPool()->pushTask(task);
    }
    return 0;
}